﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="TypeMapping"
    targetNamespace="http://dblgen/typeMapping"
    xmlns:tm="http://dblgen/typeMapping"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
>
    <xs:element name="typeMapping" type="tm:TypeMapping" />

    <xs:complexType name="TypeMapping">
        <xs:sequence>
            <xs:element name="map" type="tm:Map" minOccurs="1" maxOccurs="unbounded" />
        </xs:sequence>
        <xs:attribute name="source" type="xs:string" use="required" />
        <xs:attribute name="target" type="xs:string" use="required" />
        <xs:attribute name="defaultCodeType" type="xs:string" use="optional" />
        <xs:attribute name="customAttribute" type="xs:string" use="optional" />
    </xs:complexType>

    <xs:complexType name="Map">
        <xs:attribute name="sqlType" type="xs:string" use="required" />
        <xs:attribute name="codeType" type="xs:string" use="required" />
        <xs:attribute name="nullableCodeType" type="xs:string" use="optional" />
    </xs:complexType>
</xs:schema>
